package edu.unf.cen6940.web;

import edu.unf.cen6940.dao.FacultyDAO;
import edu.unf.cen6940.dao.FacultyresearchDAO;
import edu.unf.cen6940.dao.FacultyresearchtostudentDAO;
import edu.unf.cen6940.dao.ThesiscommitteeDAO;

import edu.unf.cen6940.domain.Faculty;
import edu.unf.cen6940.domain.Facultyresearch;
import edu.unf.cen6940.domain.Facultyresearchtostudent;
import edu.unf.cen6940.domain.Thesiscommittee;

import edu.unf.cen6940.service.FacultyService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;

import org.springframework.web.bind.WebDataBinder;

import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import org.springframework.web.servlet.ModelAndView;

/**
 * Spring MVC controller that handles CRUD requests for Faculty entities
 * 
 */

@Controller("FacultyController")
public class FacultyController {

	/**
	 * DAO injected by Spring that manages Faculty entities
	 * 
	 */
	@Autowired
	private FacultyDAO facultyDAO;

	/**
	 * DAO injected by Spring that manages Facultyresearch entities
	 * 
	 */
	@Autowired
	private FacultyresearchDAO facultyresearchDAO;

	/**
	 * DAO injected by Spring that manages Facultyresearchtostudent entities
	 * 
	 */
	@Autowired
	private FacultyresearchtostudentDAO facultyresearchtostudentDAO;

	/**
	 * DAO injected by Spring that manages Thesiscommittee entities
	 * 
	 */
	@Autowired
	private ThesiscommitteeDAO thesiscommitteeDAO;

	/**
	 * Service injected by Spring that provides CRUD operations for Faculty entities
	 * 
	 */
	@Autowired
	private FacultyService facultyService;

	/**
	 * Create a new Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/newFacultyThesiscommitteesForCommitteeMember1")
	public ModelAndView newFacultyThesiscommitteesForCommitteeMember1(@RequestParam Integer faculty_facultyId) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", new Thesiscommittee());
		mav.addObject("newFlag", true);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember1/editThesiscommitteesForCommitteeMember1");

		return mav;
	}

	/**
	 * Edit an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/editFacultyThesiscommitteesForCommitteeMember1")
	public ModelAndView editFacultyThesiscommitteesForCommitteeMember1(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember1_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember1_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember1/editThesiscommitteesForCommitteeMember1");

		return mav;
	}

	/**
	 * Edit an existing Facultyresearchtostudent entity
	 * 
	 */
	@RequestMapping("/editFacultyFacultyresearchtostudents")
	public ModelAndView editFacultyFacultyresearchtostudents(@RequestParam Integer faculty_facultyId, @RequestParam Integer facultyresearchtostudents_facultyResearchId, @RequestParam Integer facultyresearchtostudents_studentId, @RequestParam Integer facultyresearchtostudents_facultyId) {
		Facultyresearchtostudent facultyresearchtostudent = facultyresearchtostudentDAO.findFacultyresearchtostudentByPrimaryKey(facultyresearchtostudents_facultyResearchId, facultyresearchtostudents_studentId, facultyresearchtostudents_facultyId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("facultyresearchtostudent", facultyresearchtostudent);
		mav.setViewName("faculty/facultyresearchtostudents/editFacultyresearchtostudents");

		return mav;
	}

	/**
	 * Create a new Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/newFacultyThesiscommitteesForCommitteeMember5")
	public ModelAndView newFacultyThesiscommitteesForCommitteeMember5(@RequestParam Integer faculty_facultyId) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", new Thesiscommittee());
		mav.addObject("newFlag", true);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember5/editThesiscommitteesForCommitteeMember5");

		return mav;
	}

	/**
	 * Save an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/saveFacultyThesiscommitteesForCommitteeMember4")
	public ModelAndView saveFacultyThesiscommitteesForCommitteeMember4(@RequestParam Integer faculty_facultyId, @ModelAttribute Thesiscommittee thesiscommitteesforcommitteemember4) {
		Faculty parent_faculty = facultyService.saveFacultyThesiscommitteesForCommitteeMember4(faculty_facultyId, thesiscommitteesforcommitteemember4);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", parent_faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Save an existing Facultyresearch entity
	 * 
	 */
	@RequestMapping("/saveFacultyFacultyresearchs")
	public ModelAndView saveFacultyFacultyresearchs(@RequestParam Integer faculty_facultyId, @ModelAttribute Facultyresearch facultyresearchs) {
		Faculty parent_faculty = facultyService.saveFacultyFacultyresearchs(faculty_facultyId, facultyresearchs);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", parent_faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Show all Faculty entities
	 * 
	 */
	@RequestMapping("/indexFaculty")
	public ModelAndView listFacultys() {
		ModelAndView mav = new ModelAndView();

		mav.addObject("facultys", facultyService.loadFacultys());

		mav.setViewName("faculty/listFacultys");

		return mav;
	}

	/**
	 * View an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/selectFacultyThesiscommitteesForCommitteeMember5")
	public ModelAndView selectFacultyThesiscommitteesForCommitteeMember5(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember5_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember5_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember5/viewThesiscommitteesForCommitteeMember5");

		return mav;
	}

	/**
	 */
	@RequestMapping("/facultyController/binary.action")
	public ModelAndView streamBinary(@ModelAttribute HttpServletRequest request, @ModelAttribute HttpServletResponse response) {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("streamedBinaryContentView");
		return mav;

	}

	/**
	 * Select the child Thesiscommittee entity for display allowing the user to confirm that they would like to delete the entity
	 * 
	 */
	@RequestMapping("/confirmDeleteFacultyThesiscommitteesForCommitteeMember1")
	public ModelAndView confirmDeleteFacultyThesiscommitteesForCommitteeMember1(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember1_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("thesiscommittee", thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(related_thesiscommitteesforcommitteemember1_thesisCommitteeId));
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember1/deleteThesiscommitteesForCommitteeMember1");

		return mav;
	}

	/**
	 * Save an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/saveFacultyThesiscommitteesForCommitteeMember1")
	public ModelAndView saveFacultyThesiscommitteesForCommitteeMember1(@RequestParam Integer faculty_facultyId, @ModelAttribute Thesiscommittee thesiscommitteesforcommitteemember1) {
		Faculty parent_faculty = facultyService.saveFacultyThesiscommitteesForCommitteeMember1(faculty_facultyId, thesiscommitteesforcommitteemember1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", parent_faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Delete an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/deleteFacultyThesiscommitteesForCommitteeMember1")
	public ModelAndView deleteFacultyThesiscommitteesForCommitteeMember1(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember1_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		Faculty faculty = facultyService.deleteFacultyThesiscommitteesForCommitteeMember1(faculty_facultyId, related_thesiscommitteesforcommitteemember1_thesisCommitteeId);

		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Delete an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/deleteFacultyThesiscommitteesForCommitteeMember2")
	public ModelAndView deleteFacultyThesiscommitteesForCommitteeMember2(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember2_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		Faculty faculty = facultyService.deleteFacultyThesiscommitteesForCommitteeMember2(faculty_facultyId, related_thesiscommitteesforcommitteemember2_thesisCommitteeId);

		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Save an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/saveFacultyThesiscommitteesForCommitteeMember3")
	public ModelAndView saveFacultyThesiscommitteesForCommitteeMember3(@RequestParam Integer faculty_facultyId, @ModelAttribute Thesiscommittee thesiscommitteesforcommitteemember3) {
		Faculty parent_faculty = facultyService.saveFacultyThesiscommitteesForCommitteeMember3(faculty_facultyId, thesiscommitteesforcommitteemember3);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", parent_faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Register custom, context-specific property editors
	 * 
	 */
	@InitBinder
	public void initBinder(WebDataBinder binder, HttpServletRequest request) { // Register static property editors.
		binder.registerCustomEditor(java.util.Calendar.class, new org.skyway.spring.util.databinding.CustomCalendarEditor());
		binder.registerCustomEditor(byte[].class, new org.springframework.web.multipart.support.ByteArrayMultipartFileEditor());
		binder.registerCustomEditor(boolean.class, new org.skyway.spring.util.databinding.EnhancedBooleanEditor(false));
		binder.registerCustomEditor(Boolean.class, new org.skyway.spring.util.databinding.EnhancedBooleanEditor(true));
		binder.registerCustomEditor(java.math.BigDecimal.class, new org.skyway.spring.util.databinding.NaNHandlingNumberEditor(java.math.BigDecimal.class, true));
		binder.registerCustomEditor(Integer.class, new org.skyway.spring.util.databinding.NaNHandlingNumberEditor(Integer.class, true));
		binder.registerCustomEditor(java.util.Date.class, new org.skyway.spring.util.databinding.CustomDateEditor());
		binder.registerCustomEditor(String.class, new org.skyway.spring.util.databinding.StringEditor());
		binder.registerCustomEditor(Long.class, new org.skyway.spring.util.databinding.NaNHandlingNumberEditor(Long.class, true));
		binder.registerCustomEditor(Double.class, new org.skyway.spring.util.databinding.NaNHandlingNumberEditor(Double.class, true));
	}

	/**
	 * Edit an existing Facultyresearch entity
	 * 
	 */
	@RequestMapping("/editFacultyFacultyresearchs")
	public ModelAndView editFacultyFacultyresearchs(@RequestParam Integer faculty_facultyId, @RequestParam Integer facultyresearchs_facultyResearchId) {
		Facultyresearch facultyresearch = facultyresearchDAO.findFacultyresearchByPrimaryKey(facultyresearchs_facultyResearchId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("facultyresearch", facultyresearch);
		mav.setViewName("faculty/facultyresearchs/editFacultyresearchs");

		return mav;
	}

	/**
	 * Select the child Thesiscommittee entity for display allowing the user to confirm that they would like to delete the entity
	 * 
	 */
	@RequestMapping("/confirmDeleteFacultyThesiscommitteesForCommitteeMember3")
	public ModelAndView confirmDeleteFacultyThesiscommitteesForCommitteeMember3(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember3_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("thesiscommittee", thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(related_thesiscommitteesforcommitteemember3_thesisCommitteeId));
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember3/deleteThesiscommitteesForCommitteeMember3");

		return mav;
	}

	/**
	 * Edit an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/editFacultyThesiscommitteesForChair")
	public ModelAndView editFacultyThesiscommitteesForChair(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforchair_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforchair_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforchair/editThesiscommitteesForChair");

		return mav;
	}

	/**
	 * Select an existing Faculty entity
	 * 
	 */
	@RequestMapping("/selectFaculty")
	public ModelAndView selectFaculty(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}
	

	/**
	 * View an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/selectFacultyThesiscommitteesForCommitteeMember1")
	public ModelAndView selectFacultyThesiscommitteesForCommitteeMember1(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember1_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember1_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember1/viewThesiscommitteesForCommitteeMember1");

		return mav;
	}

	/**
	 * Edit an existing Faculty entity
	 * 
	 */
	@RequestMapping("/editFaculty")
	public ModelAndView editFaculty(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/editFaculty");

		return mav;
	}

	/**
	 * Create a new Faculty entity
	 * 
	 */
	@RequestMapping("/newFaculty")
	public ModelAndView newFaculty() {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", new Faculty());
		mav.addObject("newFlag", true);
		mav.setViewName("faculty/editFaculty");

		return mav;
	}

	/**
	 * Show all Thesiscommittee entities by Faculty
	 * 
	 */
	@RequestMapping("/listFacultyThesiscommitteesForCommitteeMember4")
	public ModelAndView listFacultyThesiscommitteesForCommitteeMember4(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/thesiscommitteesforcommitteemember4/listThesiscommitteesForCommitteeMember4");

		return mav;
	}

	/**
	 * Show all Thesiscommittee entities by Faculty
	 * 
	 */
	@RequestMapping("/listFacultyThesiscommitteesForCommitteeMember5")
	public ModelAndView listFacultyThesiscommitteesForCommitteeMember5(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/thesiscommitteesforcommitteemember5/listThesiscommitteesForCommitteeMember5");

		return mav;
	}

	/**
	 * Edit an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/editFacultyThesiscommitteesForCommitteeMember5")
	public ModelAndView editFacultyThesiscommitteesForCommitteeMember5(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember5_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember5_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember5/editThesiscommitteesForCommitteeMember5");

		return mav;
	}

	/**
	 * Edit an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/editFacultyThesiscommitteesForCommitteeMember4")
	public ModelAndView editFacultyThesiscommitteesForCommitteeMember4(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember4_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember4_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember4/editThesiscommitteesForCommitteeMember4");

		return mav;
	}

	/**
	 * Create a new Facultyresearchtostudent entity
	 * 
	 */
	@RequestMapping("/newFacultyFacultyresearchtostudents")
	public ModelAndView newFacultyFacultyresearchtostudents(@RequestParam Integer faculty_facultyId) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("facultyresearchtostudent", new Facultyresearchtostudent());
		mav.addObject("newFlag", true);
		mav.setViewName("faculty/facultyresearchtostudents/editFacultyresearchtostudents");

		return mav;
	}

	/**
	 * Create a new Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/newFacultyThesiscommitteesForCommitteeMember2")
	public ModelAndView newFacultyThesiscommitteesForCommitteeMember2(@RequestParam Integer faculty_facultyId) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", new Thesiscommittee());
		mav.addObject("newFlag", true);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember2/editThesiscommitteesForCommitteeMember2");

		return mav;
	}

	/**
	 * View an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/selectFacultyThesiscommitteesForCommitteeMember2")
	public ModelAndView selectFacultyThesiscommitteesForCommitteeMember2(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember2_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember2_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember2/viewThesiscommitteesForCommitteeMember2");

		return mav;
	}

	/**
	 * Select the child Thesiscommittee entity for display allowing the user to confirm that they would like to delete the entity
	 * 
	 */
	@RequestMapping("/confirmDeleteFacultyThesiscommitteesForCommitteeMember2")
	public ModelAndView confirmDeleteFacultyThesiscommitteesForCommitteeMember2(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember2_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("thesiscommittee", thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(related_thesiscommitteesforcommitteemember2_thesisCommitteeId));
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember2/deleteThesiscommitteesForCommitteeMember2");

		return mav;
	}

	/**
	 * Delete an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/deleteFacultyThesiscommitteesForCommitteeMember5")
	public ModelAndView deleteFacultyThesiscommitteesForCommitteeMember5(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember5_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		Faculty faculty = facultyService.deleteFacultyThesiscommitteesForCommitteeMember5(faculty_facultyId, related_thesiscommitteesforcommitteemember5_thesisCommitteeId);

		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Delete an existing Faculty entity
	 * 
	 */
	@RequestMapping("/deleteFaculty")
	public String deleteFaculty(@RequestParam Integer facultyIdKey) {
		Faculty faculty = facultyDAO.findFacultyByPrimaryKey(facultyIdKey);
		facultyService.deleteFaculty(faculty);
		return "forward:/indexFaculty";
	}

	/**
	 * Delete an existing Facultyresearchtostudent entity
	 * 
	 */
	@RequestMapping("/deleteFacultyFacultyresearchtostudents")
	public ModelAndView deleteFacultyFacultyresearchtostudents(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_facultyresearchtostudents_facultyResearchId, @RequestParam Integer related_facultyresearchtostudents_studentId, @RequestParam Integer related_facultyresearchtostudents_facultyId) {
		ModelAndView mav = new ModelAndView();

		Faculty faculty = facultyService.deleteFacultyFacultyresearchtostudents(faculty_facultyId, related_facultyresearchtostudents_facultyResearchId, related_facultyresearchtostudents_studentId, related_facultyresearchtostudents_facultyId);

		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Delete an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/deleteFacultyThesiscommitteesForChair")
	public ModelAndView deleteFacultyThesiscommitteesForChair(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforchair_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		Faculty faculty = facultyService.deleteFacultyThesiscommitteesForChair(faculty_facultyId, related_thesiscommitteesforchair_thesisCommitteeId);

		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * View an existing Facultyresearch entity
	 * 
	 */
	@RequestMapping("/selectFacultyFacultyresearchs")
	public ModelAndView selectFacultyFacultyresearchs(@RequestParam Integer faculty_facultyId, @RequestParam Integer facultyresearchs_facultyResearchId) {
		Facultyresearch facultyresearch = facultyresearchDAO.findFacultyresearchByPrimaryKey(facultyresearchs_facultyResearchId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("facultyresearch", facultyresearch);
		mav.setViewName("faculty/facultyresearchs/viewFacultyresearchs");

		return mav;
	}

	/**
	 * Show all Thesiscommittee entities by Faculty
	 * 
	 */
	@RequestMapping("/listFacultyThesiscommitteesForCommitteeMember1")
	public ModelAndView listFacultyThesiscommitteesForCommitteeMember1(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/thesiscommitteesforcommitteemember1/listThesiscommitteesForCommitteeMember1");

		return mav;
	}

	/**
	 * Select the Faculty entity for display allowing the user to confirm that they would like to delete the entity
	 * 
	 */
	@RequestMapping("/confirmDeleteFaculty")
	public ModelAndView confirmDeleteFaculty(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/deleteFaculty");

		return mav;
	}

	/**
	 * View an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/selectFacultyThesiscommitteesForChair")
	public ModelAndView selectFacultyThesiscommitteesForChair(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforchair_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforchair_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforchair/viewThesiscommitteesForChair");

		return mav;
	}

	/**
	 * Create a new Facultyresearch entity
	 * 
	 */
	@RequestMapping("/newFacultyFacultyresearchs")
	public ModelAndView newFacultyFacultyresearchs(@RequestParam Integer faculty_facultyId) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("facultyresearch", new Facultyresearch());
		mav.addObject("newFlag", true);
		mav.setViewName("faculty/facultyresearchs/editFacultyresearchs");

		return mav;
	}

	/**
	 * Save an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/saveFacultyThesiscommitteesForChair")
	public ModelAndView saveFacultyThesiscommitteesForChair(@RequestParam Integer faculty_facultyId, @ModelAttribute Thesiscommittee thesiscommitteesforchair) {
		Faculty parent_faculty = facultyService.saveFacultyThesiscommitteesForChair(faculty_facultyId, thesiscommitteesforchair);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", parent_faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Select the child Facultyresearch entity for display allowing the user to confirm that they would like to delete the entity
	 * 
	 */
	@RequestMapping("/confirmDeleteFacultyFacultyresearchs")
	public ModelAndView confirmDeleteFacultyFacultyresearchs(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_facultyresearchs_facultyResearchId) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("facultyresearch", facultyresearchDAO.findFacultyresearchByPrimaryKey(related_facultyresearchs_facultyResearchId));
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.setViewName("faculty/facultyresearchs/deleteFacultyresearchs");

		return mav;
	}

	/**
	 * Delete an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/deleteFacultyThesiscommitteesForCommitteeMember4")
	public ModelAndView deleteFacultyThesiscommitteesForCommitteeMember4(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember4_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		Faculty faculty = facultyService.deleteFacultyThesiscommitteesForCommitteeMember4(faculty_facultyId, related_thesiscommitteesforcommitteemember4_thesisCommitteeId);

		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * View an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/selectFacultyThesiscommitteesForCommitteeMember4")
	public ModelAndView selectFacultyThesiscommitteesForCommitteeMember4(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember4_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember4_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember4/viewThesiscommitteesForCommitteeMember4");

		return mav;
	}

	/**
	 * Show all Facultyresearchtostudent entities by Faculty
	 * 
	 */
	@RequestMapping("/listFacultyFacultyresearchtostudents")
	public ModelAndView listFacultyFacultyresearchtostudents(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/facultyresearchtostudents/listFacultyresearchtostudents");

		return mav;
	}

	/**
	 * Show all Facultyresearch entities by Faculty
	 * 
	 */
	@RequestMapping("/listFacultyFacultyresearchs")
	public ModelAndView listFacultyFacultyresearchs(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/facultyresearchs/listFacultyresearchs");

		return mav;
	}

	/**
	 * Create a new Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/newFacultyThesiscommitteesForCommitteeMember3")
	public ModelAndView newFacultyThesiscommitteesForCommitteeMember3(@RequestParam Integer faculty_facultyId) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", new Thesiscommittee());
		mav.addObject("newFlag", true);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember3/editThesiscommitteesForCommitteeMember3");

		return mav;
	}

	/**
	 * Edit an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/editFacultyThesiscommitteesForCommitteeMember3")
	public ModelAndView editFacultyThesiscommitteesForCommitteeMember3(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember3_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember3_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember3/editThesiscommitteesForCommitteeMember3");

		return mav;
	}

	/**
	 * Delete an existing Facultyresearch entity
	 * 
	 */
	@RequestMapping("/deleteFacultyFacultyresearchs")
	public ModelAndView deleteFacultyFacultyresearchs(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_facultyresearchs_facultyResearchId) {
		ModelAndView mav = new ModelAndView();

		Faculty faculty = facultyService.deleteFacultyFacultyresearchs(faculty_facultyId, related_facultyresearchs_facultyResearchId);

		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Entry point to show all Faculty entities
	 * 
	 */
	public String indexFaculty() {
		return "redirect:/indexFaculty";
	}

	/**
	 * View an existing Facultyresearchtostudent entity
	 * 
	 */
	@RequestMapping("/selectFacultyFacultyresearchtostudents")
	public ModelAndView selectFacultyFacultyresearchtostudents(@RequestParam Integer faculty_facultyId, @RequestParam Integer facultyresearchtostudents_facultyResearchId, @RequestParam Integer facultyresearchtostudents_studentId, @RequestParam Integer facultyresearchtostudents_facultyId) {
		Facultyresearchtostudent facultyresearchtostudent = facultyresearchtostudentDAO.findFacultyresearchtostudentByPrimaryKey(facultyresearchtostudents_facultyResearchId, facultyresearchtostudents_studentId, facultyresearchtostudents_facultyId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("facultyresearchtostudent", facultyresearchtostudent);
		mav.setViewName("faculty/facultyresearchtostudents/viewFacultyresearchtostudents");

		return mav;
	}

	/**
	 * Select the child Thesiscommittee entity for display allowing the user to confirm that they would like to delete the entity
	 * 
	 */
	@RequestMapping("/confirmDeleteFacultyThesiscommitteesForCommitteeMember4")
	public ModelAndView confirmDeleteFacultyThesiscommitteesForCommitteeMember4(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember4_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("thesiscommittee", thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(related_thesiscommitteesforcommitteemember4_thesisCommitteeId));
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember4/deleteThesiscommitteesForCommitteeMember4");

		return mav;
	}

	/**
	 * Show all Thesiscommittee entities by Faculty
	 * 
	 */
	@RequestMapping("/listFacultyThesiscommitteesForChair")
	public ModelAndView listFacultyThesiscommitteesForChair(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/thesiscommitteesforchair/listThesiscommitteesForChair");

		return mav;
	}

	/**
	 * Show all Thesiscommittee entities by Faculty
	 * 
	 */
	@RequestMapping("/listFacultyThesiscommitteesForCommitteeMember3")
	public ModelAndView listFacultyThesiscommitteesForCommitteeMember3(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/thesiscommitteesforcommitteemember3/listThesiscommitteesForCommitteeMember3");

		return mav;
	}

	/**
	 * Save an existing Facultyresearchtostudent entity
	 * 
	 */
	@RequestMapping("/saveFacultyFacultyresearchtostudents")
	public ModelAndView saveFacultyFacultyresearchtostudents(@RequestParam Integer faculty_facultyId, @ModelAttribute Facultyresearchtostudent facultyresearchtostudents) {
		Faculty parent_faculty = facultyService.saveFacultyFacultyresearchtostudents(faculty_facultyId, facultyresearchtostudents);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", parent_faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Save an existing Faculty entity
	 * 
	 */
	@RequestMapping("/saveFaculty")
	public ModelAndView saveFaculty(@ModelAttribute Faculty faculty) {
		facultyService.saveFaculty(faculty);
		ModelAndView mav = new ModelAndView();

		mav.addObject("facultys", facultyService.loadFacultys());

		mav.setViewName("faculty/listFacultys");

		return mav;
		//return "forward:/indexFaculty";
	}

	/**
	 * Select the child Thesiscommittee entity for display allowing the user to confirm that they would like to delete the entity
	 * 
	 */
	@RequestMapping("/confirmDeleteFacultyThesiscommitteesForCommitteeMember5")
	public ModelAndView confirmDeleteFacultyThesiscommitteesForCommitteeMember5(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember5_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("thesiscommittee", thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(related_thesiscommitteesforcommitteemember5_thesisCommitteeId));
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember5/deleteThesiscommitteesForCommitteeMember5");

		return mav;
	}

	/**
	 * Save an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/saveFacultyThesiscommitteesForCommitteeMember5")
	public ModelAndView saveFacultyThesiscommitteesForCommitteeMember5(@RequestParam Integer faculty_facultyId, @ModelAttribute Thesiscommittee thesiscommitteesforcommitteemember5) {
		Faculty parent_faculty = facultyService.saveFacultyThesiscommitteesForCommitteeMember5(faculty_facultyId, thesiscommitteesforcommitteemember5);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", parent_faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Save an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/saveFacultyThesiscommitteesForCommitteeMember2")
	public ModelAndView saveFacultyThesiscommitteesForCommitteeMember2(@RequestParam Integer faculty_facultyId, @ModelAttribute Thesiscommittee thesiscommitteesforcommitteemember2) {
		Faculty parent_faculty = facultyService.saveFacultyThesiscommitteesForCommitteeMember2(faculty_facultyId, thesiscommitteesforcommitteemember2);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", parent_faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Delete an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/deleteFacultyThesiscommitteesForCommitteeMember3")
	public ModelAndView deleteFacultyThesiscommitteesForCommitteeMember3(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforcommitteemember3_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		Faculty faculty = facultyService.deleteFacultyThesiscommitteesForCommitteeMember3(faculty_facultyId, related_thesiscommitteesforcommitteemember3_thesisCommitteeId);

		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("faculty", faculty);
		mav.setViewName("faculty/viewFaculty");

		return mav;
	}

	/**
	 * Select the child Thesiscommittee entity for display allowing the user to confirm that they would like to delete the entity
	 * 
	 */
	@RequestMapping("/confirmDeleteFacultyThesiscommitteesForChair")
	public ModelAndView confirmDeleteFacultyThesiscommitteesForChair(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_thesiscommitteesforchair_thesisCommitteeId) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("thesiscommittee", thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(related_thesiscommitteesforchair_thesisCommitteeId));
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.setViewName("faculty/thesiscommitteesforchair/deleteThesiscommitteesForChair");

		return mav;
	}

	/**
	 * Create a new Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/newFacultyThesiscommitteesForCommitteeMember4")
	public ModelAndView newFacultyThesiscommitteesForCommitteeMember4(@RequestParam Integer faculty_facultyId) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", new Thesiscommittee());
		mav.addObject("newFlag", true);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember4/editThesiscommitteesForCommitteeMember4");

		return mav;
	}

	/**
	 * Show all Thesiscommittee entities by Faculty
	 * 
	 */
	@RequestMapping("/listFacultyThesiscommitteesForCommitteeMember2")
	public ModelAndView listFacultyThesiscommitteesForCommitteeMember2(@RequestParam Integer facultyIdKey) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("faculty", facultyDAO.findFacultyByPrimaryKey(facultyIdKey));
		mav.setViewName("faculty/thesiscommitteesforcommitteemember2/listThesiscommitteesForCommitteeMember2");

		return mav;
	}

	/**
	 * View an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/selectFacultyThesiscommitteesForCommitteeMember3")
	public ModelAndView selectFacultyThesiscommitteesForCommitteeMember3(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember3_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember3_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember3/viewThesiscommitteesForCommitteeMember3");

		return mav;
	}

	/**
	 * Edit an existing Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/editFacultyThesiscommitteesForCommitteeMember2")
	public ModelAndView editFacultyThesiscommitteesForCommitteeMember2(@RequestParam Integer faculty_facultyId, @RequestParam Integer thesiscommitteesforcommitteemember2_thesisCommitteeId) {
		Thesiscommittee thesiscommittee = thesiscommitteeDAO.findThesiscommitteeByPrimaryKey(thesiscommitteesforcommitteemember2_thesisCommitteeId, -1, -1);

		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", thesiscommittee);
		mav.setViewName("faculty/thesiscommitteesforcommitteemember2/editThesiscommitteesForCommitteeMember2");

		return mav;
	}

	/**
	 * Create a new Thesiscommittee entity
	 * 
	 */
	@RequestMapping("/newFacultyThesiscommitteesForChair")
	public ModelAndView newFacultyThesiscommitteesForChair(@RequestParam Integer faculty_facultyId) {
		ModelAndView mav = new ModelAndView();
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.addObject("thesiscommittee", new Thesiscommittee());
		mav.addObject("newFlag", true);
		mav.setViewName("faculty/thesiscommitteesforchair/editThesiscommitteesForChair");

		return mav;
	}

	/**
	 * Select the child Facultyresearchtostudent entity for display allowing the user to confirm that they would like to delete the entity
	 * 
	 */
	@RequestMapping("/confirmDeleteFacultyFacultyresearchtostudents")
	public ModelAndView confirmDeleteFacultyFacultyresearchtostudents(@RequestParam Integer faculty_facultyId, @RequestParam Integer related_facultyresearchtostudents_facultyResearchId, @RequestParam Integer related_facultyresearchtostudents_studentId, @RequestParam Integer related_facultyresearchtostudents_facultyId) {
		ModelAndView mav = new ModelAndView();

		mav.addObject("facultyresearchtostudent", facultyresearchtostudentDAO.findFacultyresearchtostudentByPrimaryKey(related_facultyresearchtostudents_facultyResearchId, related_facultyresearchtostudents_studentId, related_facultyresearchtostudents_facultyId));
		mav.addObject("faculty_facultyId", faculty_facultyId);
		mav.setViewName("faculty/facultyresearchtostudents/deleteFacultyresearchtostudents");

		return mav;
	}
	
	@RequestMapping("/searchFaculty")
	public String searchFaculty(@RequestParam String searchTerm,Model model){
		model.addAttribute("facultys", facultyDAO.searchByTerm(searchTerm));
		return "faculty/listFacultys";
	}
}